package com.gis507.test.CsvSplit;

import org.apache.hadoop.io.Writable;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class CsvBean implements Writable{

    private String id;
    private String price;

    public CsvBean() {

    }

    public CsvBean(String id, String age) {

        this.id = id;
        this.price = age;
    }

    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getAge() {
        return price;
    }
    public void setAge(String age) {
        this.price = age;
    }

    @Override
    public String toString() {
        return "," + id ;
    }

    @Override
    public void write(DataOutput dataOutput) throws IOException {

        dataOutput.writeUTF(id);
        dataOutput.writeUTF(price);
    }

    @Override
    public void readFields(DataInput dataInput) throws IOException {

        this.id = dataInput.readUTF();
        this.price = dataInput.readUTF();
    }
}
